Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes memory overflow with ldd4.3 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fixes memory overflow with ldd4.3 #1

wants to merge 1 commit into from

Conversation

SuperUserNameMan
Copy link

ldd4.3 Assets.lif contains a large db.lif file which fails to be
extracted because of a memory overflow error with python 2.7.
this patch make extraction by blocks of 16MB. if the block size is too
large, it is divided by 2 till it fits the file size ... (could be
improved though)

ldd4.3 Assets.lif contains a large db.lif file which fails to be
extracted because of a memory overflow error with python 2.7.
this path make extraction by blocks of 16MB. if the block size is too
large, it is divided by 2 till it fits the file size ... (could be
improved though)
f = open((outFolder + a[0]), "wb")
f.write(fileData[a[1]:a[1]+a[2]])
b = a[1]; e = a[1]+a[2] ; step = 0x1000000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to avoid setting multiple variables on one line.

@JrMasterModelBuilder
Copy link
Owner

The whole of LIF Extractor really could be improved, but I wouldn't mind merging some patches. I've just got a couple of notes above.

@SuperUserNameMan
Copy link
Author

Hi,
I'm aware that this patch is more a ugly hack than anything else.
Python is not something i'm used to deal with, I just needed the script to work.
Feel free to do whatever you want with this PR.
And thanks for this script !

@nachtgold
Copy link

If its ugly or not - it works 👍

@reditec
Copy link

reditec commented Oct 30, 2017

How about finally patching this python file? Plus a documentation about the format would be pretty cool as I want to write a C# tool that does the same as your the python file (not requiring python, tho).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants